#include"MyStdio.h"


int main()
{
  FILE_* file = fopen_("./log.txt","w"); 
 
  if(file == NULL)
  {
    printf("file == NULL\n");
    return 1;
  }

  const char* str = "hello world";
  int cnt = 10 ;
  while(cnt)
  {
    sleep(1);
    fwrite_(file,(void*)str,strlen(str));
    printf("%d\n",cnt);
    if(cnt == 5) fflash_(file);
    cnt--;
  }
  fclose_(file);
  return 0;
}
